• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp5
r3wp110
total:115

results window for this page: [start: 1 end: 100]

world-name: r4wp

Group: Rebol School ... REBOL School [web-public]
Arnold:
11-Jul-2012
Today I experimented with calling a REBOL script from my php script. 
Thanks to previous contributions of a.o. Ralph Roberts of abooks.com 
from 1999(!) and an entry on the PHP site I found out how to do this 
on my apache driven site.

It was not quite as straightforward as Robert said like: include 
("rebolnow.r");
Nor was it as simple as: system("rebolnow.r 2>&1", $myout);
echo $myout;

But it worked when I called out for the REBOL program first. Both 
two of the next examples worked for me:
system("/path/to/cgi-bin/rebol -c %rebolnow.r 2>&1", $myout);
echo $myout;
AND secondly
echo system("/path/to/cgi-bin/rebol -c %rebolnow.r");
Work!

The REBOL script must be in the same dir as your PHP script (Not 
in your cgi-bin directory)(I didn't test sub dirs and other dirs 
but I suppose they work like usual)
The script does not need the #!/path/to/rebol line at the top.
The script should not print http-headers and

When printing stuff the last line should read print "" because the 
last printed line will be repeated.

Hope this helps more people to switch from php scripting to REBOL 
scripting for their websites.
GrahamC:
4-Sep-2012
this works, the other two do not

 system/schemes/default/timeout: 0:01:10
 ;system/schemes/http/timeout: 0:01:10
;system/schemes/https/timeout: 0:01:10
DocKimbel:
10-Oct-2012
Sujoy: have a look at this description of  one of async HTTP clients 
available: http://stackoverflow.com/questions/1653969/rebol-multitasking-with-async-why-do-i-get-invalid-port-spec
Group: !REBOL3 ... General discussion about REBOL 3 [web-public]
GrahamC:
16-Jan-2013
We kept the http-error from Gab's prot-http.r until we figure out 
what to do about errors
GrahamC:
18-Jan-2013
So, what should query do in the prot-http?

world-name: r3wp

Group: Ann-Reply ... Reply to Announce group [web-public]
Dockimbel:
8-Apr-2008
I already have a NTLM proxy built on UniServe that could do the job, 
but for AltME, to be able to pass a MS Proxy, it has to first, use 
HTTP as transport layer (IIRC it's not using HTTP currently ?).
Group: !AltME ... Discussion about AltME [web-public]
Colin:
8-Feb-2006
I used to run altme all the time at work until they clamped down 
on all firewall and proxy ports. I found it to be the ideal program 
to log progress on tasks I was doing but now it wont connect. I only 
need it to do the do name or world resolution as the server would 
be running inside the firewall too. No data traffic needs to flow 
outside the firewall. Reichart - is it possible to have a local name 
world name server our enable the name resolution to be proxied through 
http, and I could just plug in the corporate gateway/proxy?
Colin:
9-Feb-2006
Guess not. What I want to be able to do is start a world inside the 
firewall and then only have clients inside it connect. The clients 
would need to know how to resolve the world name and IP address thru 
some mechanism that doesnt require going out of the firewall to do 
so or allow the name resolution and server declaration protocols 
be proxied through http. I think that should pass through most corporate 
firewalls.
[unknown: 9]:
9-Feb-2006
We agree teh HTTP part is a possible solve (something we are looking 
at).  But the other way around, allowing no name server offered by 
us means instant piracy at the very level where the only market that 
pays would do so.  No?
Maxim:
16-Jan-2007
I think it has to do with the fact that many service providers will 
timeout an http port  xfer even if its still working.  and that amounts 
to about 6MB .  I have that kind of effect with gmail.  if I try 
to download something larger than 3MB it fails... because of the 
length it takes to download with my phone  modem
Graham:
21-Feb-2007
Anton, if the proxy only allows http packets .. then there is nothing 
that RT can do about this.
Group: RAMBO ... The REBOL bug and enhancement database [web-public]
Allen:
11-Oct-2005
RFC 2616
10.3.8 307 Temporary Redirect


   The requested resource resides temporarily under a different URI.

   Since the redirection MAY be altered on occasion, the client SHOULD

   continue to use the Request-URI for future requests.  This response

   is only cacheable if indicated by a Cache-Control or Expires header
   field.

   The temporary URI SHOULD be given by the Location field in the

   response. Unless the request method was HEAD, the entity of the

   response SHOULD contain a short hypertext note with a hyperlink to
   the new URI(s) , since many pre-HTTP/1.1 user agents do not

   understand the 307 status. Therefore, the note SHOULD contain the

   information necessary for a user to repeat the original request on
   the new URI.


   If the 307 status code is received in response to a request other

   than GET or HEAD, the user agent MUST NOT automatically redirect 
   the

   request unless it can be confirmed by the user, since this might
   change the conditions under which the request was issued.
BrianH:
8-Feb-2007
I'm looking at the http protocol source, and I find no indication 
of any fix to the default line ending of ssl:// - do I have the right 
source? It is dated 5-Dec-2005...
Oldes:
19-May-2007
just found, that youtube do not respect HTTP1.0 protocol => sends 
HTTP1.1 303 response even if client require HTTP1.0 (which is Rebol 
case). As there is no response specified for 303 in Rebol's http 
handler, it can be fixed using:

use [tmp][

 tmp: select second get in system/schemes/http/handler 'open to-set-word 
 'response-actions
	if none? find tmp 303
	insert tmp reduce [303 select tmp 302]
]
Anton:
21-May-2007
Oldes, note that you can do this, which looks clearer to me:

select second get in system/schemes/http/handler 'open [response-actions:]
Anton:
21-May-2007
Oldes, how do you classify this patch ? Is it simply improving Rebol's 
HTTP 1.0 scheme, or is it half-way sliding towards HTTP 1.1 ?
(ie. does the official HTTP 1.0 spec contain a 303 response ?)
Oldes:
21-May-2007
Note: Many pre-HTTP/1.1 user agents do not understand the 303

      status. When interoperability with such clients is a concern, the

      302 status code may be used instead, since most user agents react
      to a 302 response as described here for 303.
Group: Core ... Discuss core issues [web-public]
Pekr:
26-Jan-2006
I tried Carl's site monitor - Gismo, but it converts sites to tcp 
ports, instead of staying with http ... how can I easily add proxy 
support to manually constructed tcp port? I do remember some tricks 
with subport where actually port is, but can't make it work easily 
...
Terry:
28-Jan-2006
Not sure that this can even be determined with Rebol.. Probably need 
to do a workaround.. send a http request to a remote script, peel 
the IP from that, send it back?
Sunanda:
13-Apr-2007
You might be able to fiddle with the http scheme for this condition.....
If you do this:
   zz: open http://www.aving.co.kr
   probe zz
   find mold zz "response-actions:"
You'll see there is a tale of acceptable reponse codes.

So (just an idea) patch that to include 500, and then check if the 
in-buffer field has any <html> content
DanielSz:
30-Aug-2007
Hi Rebol community, I was wondering about how you deal with error 
handling in Rebol in those situations where you have a number of 
network operations which are likely to fail part of the time. Of 
course, you already raised the timeout for network protocols (system/schemes/default/timeout: 
0:10). Now say your script contains a number of network operations 
(read url, for example) wrapped in user functions. This is a very 
common situation.

For example:

fetch-actual-ip: does [

        page: read-url-with-basic-auth http://192.168.1.1/Status.htm(http-basic-auth-key 
        router_username router_password)
	parse page [thru <td class="stdbold" nowrap> copy ip to </td>]
	return to-tuple ip
]


Now this is fine, but if your read operation fails, the script will 
abort. You would like the function to try again a couple of times.


The first thing you would be tempted to do is to redefine the function 
to repeat the function in case of error or unexpected result. A recursive 
function like the next one may provide some solace: 

fetch-actual-ip: does [

        page: read-url-with-basic-auth http://192.168.1.1/Status.htm(http-basic-auth-key 
        router_username router_password)
        either none? tmp: find/tail page "ip address"
                [
                print "Retrying..."
                retries: retries + 1

                if retries > 10 [print "Retried 10 times. Exiting" quit]
                fetch-actual-ip
               ] [

                parse tmp [thru <td class="stdbold" nowrap> copy ip to </td>]
                retries: 0
                return to-tuple ip
                ]
]


You might have a number of user functions and each can fail, so transforming 
every user function into a recursive one with its own error handling 
block can be tedious. 


Wouldn't it be better to abstract the process with a meta-function 
that accepts as input the user function itself? The error handling 
logic would then be exclusively handled by that meta-function, which 
will save you from redundancy if you have multiple user functions. 

Let's do it:


retry: func [external_function [function!] retries [integer!] /local 
.retry [function!] tries [integer!] value] [
	tries: 0
	.retry: func [.external_function [function!]] [
		either not error? try [value: .external_function]
			[
			if not none? value [return value]
			]
			[
			print "Retrying..."
			tries: tries + 1

   if tries > retries [print rejoin ["Tried function " tries " times. 
   Exiting"] return]
			.retry :.external_function
			]
	]
	.retry :external_function
]

Now you call the short version of fetch-actual-ip like this:

retry :fetch-actual-ip 5

(try the user function 'fetch-actual-ip up to 5 times)

Anyone wants to comment or improve on this?
Graham:
22-Sep-2008
Looks like I need to do a HTTP PUT to upload binary files ....
Gabriele:
23-Sep-2008
Graham, in R3's http you can use any method you want, with any headers 
you want and any content you want. Was this your question? (I do 
still need to add transparent cookie support. but that's a few minutes 
work, so it'll be there for release.)
Janko:
30-Jun-2009
I was nagging you about the actors+message passing rebol lib I was 
playing with..  Now I have a real thing running with it .. I will 
post source code on blog soon. It's not that exciting video .. just 
some text changing :) but I hope it will help in getting a picture 
when I post the code.


On left is a Linux server with work dispatcher on  right are two 
workers on windows. There can be as many workers on many computers 
or none and workers can drop out at any time without work being undone/"halfdone". 


It uses message passing and actors for everything.. and comunication 
works like at tuple spaces so you get autobalancing. It's not something 
that special, you could do something roughly the same with http server 
app probably, although it would be a little more messy.
Graham:
4-Aug-2009
the info? function appears to send a http HEAD to a URL, but the 
http protocol doesn't appear to allow a user to send a HEAD.
So, how does info? do it?
Graham:
5-Aug-2009
I couldn't see a way to do that with the standard http protocol
Graham:
8-Aug-2009
But if I do a wireshark trace, I see this

GET /20090806.7z HTTP/1.0
Accept: */*
Connection: close
User-Agent: REBOL View 2.7.6.3.1
Host: remr.s3.amazonaws.com

HTTP/1.0 403 Forbidden
Date: Sat, 08 Aug 2009 21:08:07 GMT
Content-Type: application/xml
x-amz-request-id: D03B3FA12CC875D5

x-amz-id-2: u3b7TkPzJc5NBwvov4HRQuMsCsosD7le9xfRMSGiCN2BXgeae6kKMVQAbhzqRDwY
Server: AmazonS3
Via: 1.1 nc1 (NetCache NetApp/6.0.5P1)

<?xml version="1.0" encoding="UTF-8"?>

<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>D03B3FA12CC875D5</RequestId><HostId>u3b7TkPzJc5NBwvov4HRQuMsCsosD7le9xfRMSGiCN2BXgeae6kKMVQAbhzqRDwY</HostId></Error>
Gabriele:
9-Aug-2009
No, the HTTP scheme is working correctly. AWS' behavior is non-standard, 
so it requires some level of custom programming. R3's scheme allows 
you to handle cases like this at a lower level for example, but by 
default it can't do better than that.
Graham:
9-Dec-2009
Yes, I use hylafax which runs on linux .. but a windows client just 
has to do a http post of the file to the hylafax server
Group: Script Library ... REBOL.org: Script library and Mailing list archive [web-public]
Andreas:
20-Oct-2010
HTTP requires CRLF termination anyway, so what I usually do is sthg 
like:
prin rejoin [
  "Some-Header:" some-value crlf
  "Another-Header:" another-value crlf
  crlf
]
Group: I'm new ... Ask any question, and a helpful person will try to answer. [web-public]
jack-ort:
2-Jul-2010
Hello - hope someone can find the newbie mistake I'm making here. 
 Wanted to use REBOL to tackle a need to get data from Salesforce 
using their SOAP API.  New to SOAP, WSDL and Salesforce, but using 
SoapUI mananged to do this POST (edited only to hide personal info):

POST https://login.salesforce.com/services/Soap/u/19.0HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
User-Agent: Jakarta Commons-HttpClient/3.1
Host: login.salesforce.com
Content-Length: 525


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:partner.soap.sforce.com">
   <soapenv:Header>
      <urn:CallOptions>
         <urn:client></urn:client>
         <urn:defaultNamespace></urn:defaultNamespace>
      </urn:CallOptions>
   </soapenv:Header>
   <soapenv:Body>
      <urn:login>
         <urn:username>[jort-:-xxxxxxxxxxxxx-:-com]</urn:username>

         <urn:password>xxxxxxxxxx78l6g7iFac5uaviDnJLFxxxxx</urn:password>
      </urn:login>
   </soapenv:Body>
</soapenv:Envelope>

and get the desired response:

HTTP/1.1 200 OK
Server: 
Content-Encoding: gzip
Content-Type: text/xml; charset=utf-8
Content-Length: 736
Date: Fri, 02 Jul 2010 20:32:14 GMT


<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="urn:partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><loginResponse> 
......

Then using SoapUI I am able to send a successful Logout message.


Using REBOL 2.7.7.3.1, I created an "upload" string containing the 
POST block above without the "POST " at the beginning, set my url 
to:

>> url
== https://login.salesforce.com/services/Soap/u/19.0

and tried this:

>> response: read/custom url reduce ['POST upload]

but consistently get a Server 500 error:


** User Error: Error.  Target url: https://login.salesforce.com:443/services/Soap/u/19.0 
could not be retrieved.  Se
rver response: HTTP...
** Near: response: read/custom url reduce ['POST upload]

For completeness, here's the upload value:

>> print mold upload
{https://login.salesforce.com/services/Soap/u/19.0HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
User-Agent: Jakarta Commons-HttpClient/3.1
Host: login.salesforce.com
Content-Length: 525


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:partner.soap.sforce.com">

   <soapenv:Header>
      <urn:CallOptions>
         <urn:client></urn:client>
         <urn:defaultNamespace></urn:defaultNamespace>
      </urn:CallOptions>
   </soapenv:Header>
   <soapenv:Body>
      <urn:login>
         <urn:username>[jort-:-researchpoint-:-com]</urn:username>

         <urn:password>metrics12378l6g7iFac5uaviDnJLFVprDl</urn:password>
      </urn:login>
   </soapenv:Body>
</soapenv:Envelope>}

Would appreciate any help you can give!
Group: Parse ... Discussion of PARSE dialect [web-public]
BrianH:
6-Jan-2010
PARSE returns true if the rule matches and covers the entire input, 
or false otherwise. Your rule matched but there was input left over. 
PARSE's return value doesn't matter in this case, just whether file 
is set or not. If you are using R3 you can do this too:
parse buffer [ "get" [ "http" | "/" | return to " "]]
Group: Syllable ... The free desktop and server operating system family [web-public]
Graham:
20-Oct-2007
only one peer in the swarm .. might as well do an http download from 
your S3 storage!
Group: Linux ... [web-public] group for linux REBOL users
ManuM:
15-Oct-2009
Claude, I have a similar solution, I redefine browse in user.r
browse: funct [ url ] [ call reform [ "x-www-browser" url ]]
So you can do
browse http;//www.rebol.com

But docs, and bugs don“t work ( you can redefine them too If you 
want ), but I think you don't like this solution.
Group: CGI ... web server issues [web-public]
RebolJohn:
18-May-2005
HELP w/ web rebol associations AND Rebol-View.
Here is the story..


On my PC, I have View pointing to an index.r file on my web server.
Everything is cool.

When I open up Rebol-View and traverse to my index.r on the server..
it works.


Now on the same server, I change the IIS-Web associations so that 
I can do rebol CGI.
I create a 'main.r' in some virtual directory on the server.
Web-ing to this http.//myserver/mydir/main.r   works GREAT!
CGI is working.


However, when I now open up Rebol-View on my local PC and traverse 
to my index.r which is
on the server.. I get an error.


The problem is that before.. rebol-view was requesting a file-download 
and the server sends it.

Now since IIS is doing '*.r' CGI, when rebol-view requests for the 
index.r download.. the server is processing the request
and attempting to send back html.. not a rebol file.


Is there any way of fixing this other than..

* changing the CGI association from '*.r' to something else  (ie. 
'*.rr')

* changing all my view-apps on the server from '*.r' to something 
else   (ie. '*.rr')
??
Graham:
25-Jul-2007
this is an article I wrote in 2003 hacking the http protocol to do 
this too http://www.compkarori.com/vanilla/display/HTTP+file+uploading
DanielSz:
26-Jul-2007
Ok, I'll try to hack the http-tools.r, see if I can get anything 
done. I saw a script written in python claiming to do multipart uploads, 
but I hope I can get it working in Rebol, which for me is always 
first choice.
DanielSz:
26-Jul-2007
Graham described what needs to be done (I used a variant of the http-tools.r 
script, composed the correct header, and then insert the headers, 
and then switched the port to binary before inserting the payload). 
Only it's a little a bit above my capacities. In other words, I'll 
need two weeks to do it, if I ever manage it.
DanielSz:
26-Jul-2007
Yeah, I remember some tips you contributed to the rebolzine on posting 
to web forms, way back... Anyway, I think I won't tinker with the 
http scheme, kinda dpressing thought, especially since I have great 
hopes to achieve what I need using curl and the shell capability 
of Rebol. Let curl do that work, afte r all, that's what' it's meant 
to do best.
Group: Web ... Everything web development related [web-public]
Geomol:
29-Mar-2005
I have a problem with HTTPS over a proxy. I'm using REBOL/Command 
2.5.6.3.1, that came with our SDK. This version first need the HTTPS 
protocol to be activated using this code:


net-utils/net-install HTTPS make system/schemes/http/handler [] 443

system/schemes/https: make system/schemes/https [user-agent: reform 
["REBOL" system/product system/version]]

I activated trace by typing: trace/net on

Our proxy is set up ok, as I can read the internet with a browser 
using it (both HTTP and HTTPS).
Now if I in REBOL do this:

>> s: read https://webservices.rki.dk

I get:

URL Parse: none none webservices.rki.dk none none none
Net-log: ["Opening" "ssl" "for" "HTTPS"]
connecting to: webservices.rki.dk
Net-log: {CONNECT webservices.rki.dk:443 HTTP/1.1
Host: webservices.rki.dk:443

}
Net-log: "HTTP/1.0 200 Connection established"
Net-log: {GET https://webservices.rki.dk:443/ HTTP/1.0
Accept: */*
Connection: close
User-Agent: REBOL Command 2.5.6.3.1
Host: webservices.rki.dk:443
}
Net-log: none

** User Error: Error.  Target url: https://webservices.rki.dk:443/ 
could not be
retrieved.  Server response: none
** Near: s: read https://webservices.rki.dk
Oldes:
5-Apr-2006
!!! Cookies-daemon script now allows to post data as a multipart 
!!!
do http://box.lebeda.ws/~hmm/rebol/cookies-daemon_latest.r
;sending single file:

read/custom target-url [multipart [myfile %somefile.txt]]   ;== same 
like <INPUT TYPE=FILE NAME=myfile>
;sending normal fields:

read/custom target-url [multipart [field1 "some value" field2 "another 
value]]
;sending multivalue:

read/custom target-url [multipart ["field[]" "some value" "field[]" 
"another value]]
;sending file with field value:

read/custom target-url [multipart [myfile %somefile.txt field1 "some 
value"]]


Source files (with modified %http-patch.r) are in this archive:  
http://box.lebeda.ws/~hmm/rebol/cookies-daemon_latest.rip

As it's part of the cookies-daemon, it should deal with the cookies 
automatically.


The script is trying to detect content-type of the file which you 
want to upload calling get-content-type function, which is not part 
of the cookies-daemon (at this moment)
Sunanda:
19-Oct-2007
Never tried it that way myself (I always add headers in the CGI script).
This link suggests you can tweak your .htaccess to do it:

http://www.askapache.com/htaccess/using-http-headers-with-htaccess.html
amacleod:
11-Feb-2009
I'm using dyndns as I have a dynamic ip. 

If i type my url into the browser from a macine outside my local 
network I get my web page. If I do it from within my local network 
(even on a different machine) I can't not get through to the page 
"Cannot display webpage" error.

It's not just http. I'm accessing a mysql server too with the same 
problem resulting. 

I know I can use "localhost but I would need to change my code everytime 
I'm using it locally.
Group: Announce ... Announcements only - use Ann-reply to chat [web-public]
Henrik:
28-Sep-2006
HTTP Tools. A small script containing a few functions to read the 
HTTP header of a webserver. It doesn't do much, but the main purpose 
is to determine which scripting language is used on a specific webserver. 
I use it to upload ASP and PHP scripts to various webservers, without 
having the user needing to know the scripting language in advance. 
It's not very strong yet and some servers will not reveal this information, 
but I hope it can be built into a reliable tool for determining scriping 
language over time.

http://hmkdesign.dk/rebol/http-tools/http-tools.r

Example:

>> server-type http://rebol.com
== "Apache"
>> x-power-type http://www.hmkdesign.dk
== "php"
>> x-power-type http://www.microsoft.com
== "asp"
Group: SDK ... [web-public]
AndrewL:
20-Jun-2006
If I made a typing mistake above it wasn't in the original, as you 
can see I get an error including the file via http, that same file 
works perfectly when i do it ...
Group: !Uniserve ... Creating Uniserve processes [web-public]
DideC:
9-Mar-2005
Rebol [

 title: "example of starter script that act the same with View after 
 encap"
]

#include %/e/rebol/sdk/source/mezz.r
#include %/e/rebol/sdk/source/prot.r
#include %/e/rebol/sdk/source/view.r

;***** This is the function that make the tricks
#include %uniserve/libs/encap-fs.r 
if not value? 'encap-fs [do %uniserve/libs/encap-fs.r]

set-cache [
	%uniserve/uni-engine.r		[#include %uniserve/uni-engine.r]
	%uniserve/libs/headers.r	[#include %uniserve/libs/headers.r]
	%libs/log.r					[#include %uniserve/libs/log.r]
	%uniserve/protocols/HTTP.r	[#include %uniserve/protocols/HTTP.r]
	
	%your-file.r					[#include %path/to/your-file.r]
	;...
]

;***** Start
do-cache %uniserve/uni-engine.r
do-cache %uniserve/libs/headers.r

UniServe-path: %./uniserve/
logger/level: none


;***** You have to load protocols and services before starting Uniserve
do-cache %uniserve/protocols/HTTP.r

;***** Uniserve Initialise
; Require like this to not loading protocols/services from disk
uniserve/boot/no-loop/with []

;***** Your script initialise
;...
Scot:
1-Oct-2006
Need some help...Can't seem to get Uniserv working on my XP laptop. 
 This is my first try...so I don't have enough experience to see 
what is happening.  Do I have the wrong version of core?

>> uniserve/boot
[uniserve] Async Protocol Admin loaded
[uniserve] Async Protocol DNS loaded
[uniserve] Async Protocol FastCGI loaded
[uniserve] Async Protocol HTTP loaded

** Script Error: change expected series argument of type: series 
port
** Where: install-plugin
** Near: change pos/2 new
>>
Mchean:
29-Jan-2007
I figured out how to stop the service tying up the 80 port , When 
i run this is what I get: >> do %/c/temp/rebol/uniserve/uni-engine.r
== true
>> uniserve/boot
[uniserve] Async Protocol Admin loaded
[uniserve] Async Protocol DNS loaded
[uniserve] Async Protocol FastCGI loaded
[uniserve] Async Protocol HTTP loaded

** Script Error: change expected series argument of type: series 
port
** Where: install-plugin
** Near: change pos/2 new
BrianH:
7-Feb-2007
Do you mean that sessions are non-working, or that there is something 
about non-working sessions that makes HTTP (a stateless protocol 
that wouldn't normally need sessions) not work?
Maarten:
19-Feb-2009
The balloon goes up! I want to move Rugby's transport layer to Uniserve, 
or even better, Cheyenne. (http tunneling). For this to really work 
I only need to know if you have primitives for timers in the event 
loop (inside the 'wait): do-every time! [ code ]  do-after time! 
[code]
Janko:
29-Jan-2010
Yes, surely parse can do it... I am just debating .. I am not sure 
if mongrell is really that awesome.


I was thinking that speedwise the upper bound of the http server 
is determined by socket handling and http parsing probably? Meaning 
that even if you have everything in ram and prepared you can't serve 
more thatn that. Cheyenne has a *very* high upper bound for a dynamic 
language (I was many times expressing my surprise and getting 250 
req/s was the reason I returned back to rebol with doing all webapps 
in it now).
Group: XML ... xml related conversations [web-public]
Maxim:
12-Apr-2006
it had to do with http dowloading of the chunks...
Group: DevCon2005 ... DevCon 2005 [web-public]
Graham:
4-Oct-2005
For those that have firewall problems, suggest that they do the http 
download.
Group: !REBOL3-OLD1 ... [web-public]
Henrik:
30-Jul-2007
brian, I'd start adapting simple scripts from R2 to R3. Do that by 
adding multithreading, adapting to async HTTP, etc.
Henrik:
5-Oct-2007
Pekr, you can say that about many things. There are many protocols. 
Which one should go in first? HTTP was logical here. Now which one 
goes next? If Gabriele spends time on FTP and not on VID, I can't 
work on skinning. It could be other things, but VID is far more important 
right now than FTP, because FTP is probably fairly trivial to do, 
but still a one-man project that should be done when Gabriele can 
be free to do that.
shadwolf:
22-Jul-2008
but  achieving a web browser is more than only connect to a http 
server retrive and renders HTTP once again that way to think was 
OK in years 90  but not in years 2008 ...  Yes most of what do a 
webbrowser is to rederised HTML  page but what about the video streaming 
or animated interfaces (what flash is ablem to bring to a  webbrowser 
and make the 2008 web sites so hum dynamic)
Henrik:
22-Jul-2008
a stronger link betwin 

networking" and "visual" modules ??? hum that's like if Carl was 
preteneding we can't already do that !!??"


I haven't mentioned this, because I was afraid I would get it wrong 
and Carl would bash me for it. :-) What I'm writing here below is 
one of the reasons to switch to a webbrowser mentality. It was also 
one of the the reasons for dumping VID3.


Webbrowser mentality helps building infrastructure, very quickly. 
There is allegedly a stronger link now between VID and networking 
in the same way as there is a link between HTML and HTTP. When you 
create a link in a webpage, it takes only a few tags in one line 
of code (even inline) to do that. You don't do anything else but 
provide the link. The browser takes care of the rest, and you can 
build an entire infrastructure with hyperlinks. You don't have to 
worry about TCP ports or wait for acknowledge from the server. The 
basic philosophy that goes behind hyperlinking is its extreme simplicity, 
which is why it's so widespread. It's easy to grasp and easy to code.

When you for example write in a forum, you are often capable of providing 
hyperlinks. As a result, hyperlinking is available to any users, 
who have just the basic knowledge of coding, which to them is "typing 
funny chars to make a link".

Carl wants the same thing in VID3.4, where you must currently work 
with ports, store things in words and do something with the words 
in order to get where you need to go. You need to do some programming 
and make complex decisions. That level of detail must not go away 
of course, but there is a simplifying element that's missing, and 
that is to use buttons directly as hyperlinks. If successful, anyone 
could code simple VID GUIs.


I'm still sure I'm getting it a bit wrong, so there's not much point 
discussing it right now. He emphasized very strongly about building 
infrastructure through very simple methods that most people can understand 
and use. He talked about this more than about VID itself.
Graham:
5-Dec-2008
http bugs??  Oh oh ... Gabriele has some work to do then :(
Graham:
15-Jan-2009
do we have to trace the http to figure out what's going on?
Pekr:
8-Apr-2009
But - one thing worries me anyway - R3 http scheme is out for how 
long - 2 years? And we don't even have proxy for it. Not to mention 
other protocols. So if we (community) can't find some time to do 
other schemes, where's our help then? The thing is, that schemes 
stuff is really difficult. I can imagine myself doing some easy styles, 
but surely not complex thing as network protocols :-(
Pekr:
8-Apr-2009
Geomol - new http 1.1 scheme was done by Gabriele. And the only reason 
I mentioned it is, that it is an example of open-sourced stuff, where 
community could help, yet nothing like that is happening. Now what 
does it have to do with how deep is such stuff on Carl's list? - 
it is open sourced. And once again - see your arguments. So you DON'T 
know there are any networking related bugs, yet you claim you are 
not willing to work on it, as you suppose there are some "first levels" 
related bugs :-)
Pekr:
15-Apr-2009
Gabriele - what is the problem with chunked mode of http 1.1 protocol, 
so that it is currently disabled? Any advice for a set-up, of how 
to debug it best? What is the chunked mode good for? I am willing 
to do some tests to track possible problems, so any quick pointer 
would be fine ...
RobertS:
17-Jul-2009
when we don't find a word in a slot, we fail;  my question is COULD 
we tolerate an unset! where a word! is now expected ... the Rebol 
path! type is just too useful to ignore here ...  and our use of 
the character '/' does have "something" to do with our natural interpretaion 
of file and url - files assume valid hierarchy depth at time of tracversal, 
a web server need not ...  at the moment we have no type corresponding 
to what follows an HTTP schema and domain other than string .... 
or am I mistaken?
BrianH:
17-Jul-2009
For instance, there isn't anything in the HTTP or URL standards that 
say that the path is necessarily a hierarchy, though the (poor) cookie 
standards definitely imply it. Ignoring the cookie standards, you 
could easily look at it as a tag list. However, you would need to 
be writing the server app to do so, since the server is what decides 
what the path means.
RobertS:
13-Aug-2009
What is obscure about a syntax which permits literal strings to be 
literal strings?  Try assigning  set lit "{test} {" in your favorite 
Tcl interpreter.  I am not a JSON expert but [{ looks like JSON to 
me so #{[ "looks worrisome to me"   JSON or YAML or something other 
than XML is going to be important whether REBOL likes it or not. 
 Take RDF as one exmaple ( I prefer Topic Maps - please do not attack 
the example, but the isea ).  The fact that most people seem to think 
that RDF is XML does not make it so.  Tim Berners-Lee prefers some 
form of Triple notation for RDF.  Not XML.  As soon as a notation 
uses curly braces we have a problem using Curl on the server-side. 
 Please don't point to QM.  IT is not just tightly coupled to HTML 
it is married to it.  The web is not HTML it is HTTP with Content-Type: 
 set in the response header.  If that content type uses curly braces 
we have to start escaping characters in Rebol.  Awkward templating 
is dooked templating.  Let me repeat: doomed.  Folly.
Henrik:
10-Sep-2009
Pekr, demo is a mezz. Another issue is graphics commands, lowlevel 
View and such. How do we handle that? I'm not sure we want to submit 
graphics via HTTP to the browser.
Pekr:
5-Oct-2009
as for networking - no, what I had in mind is networking schemes 
- we do have only http 1.1, no proxy, no smtp, no pop3, no ftp, etc
Henrik:
13-Oct-2009
Note that in A87 has a problem with HTTP:

>> read http://www.rebol.net

** Access error: protocol error: "Server error: HTTP/1.1 400 Bad 
Request"


In case you are trying to do something with OSX or Linux, which currently 
only are at A87.

This is not a problem in A88.
Pekr:
9-Nov-2009
If we did not get single networking protocol in 3 years, no single 
fix to http protocol (and we are talking mezzanine level here), WHEN 
do you expect, that feature like SSL/TLS, https could appear for 
R3? That is my only worry here. I am not agains the delivery by some 
"third party", I am just worried judging by recent experience ...
shadwolf:
2-Dec-2009
in php they do it like that 

	function getHTML($page=False)
	{
		if (!$page)
			$page = $this->path;
		$contents = "";

  $domain = (substr($this->domain, 0, 7) == "http://") ? substr($this->domain, 
  7) : $this->domain;



  if (@$fp = fsockopen($domain, $this->port, $this->errno, $this->errstr, 
  2))
		{
			fputs($fp, "GET ".$page." HTTP/1.1\r\n".

    "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)\r\n".
				"Accept: */*\r\n".
				"Host: ".$domain."\r\n\r\n");

			$c = 0;
			while (!feof($fp) && $c <= 20)
			{
				$contents .= fgets($fp, 4096);
				$c++;
			}

			fclose ($fp);

			$this->encodeContent($contents);

			preg_match("/(Content-Type:)(.*)/i", $contents, $matches);
			if (count($matches) > 0)
			{
				$contentType = trim($matches[2]);


    preg_match("/(meta http-equiv=\"Content-Type\" content=\"(.*); charset=(.*)\")/iU", 
    $contents, $matches);
				if (isset($matches[3]))
				{
					$this->setStreamEncoding($matches[3]);
				}
				if ($contentType == "text/html")
				{
					$this->isShoutcast = True;
					return $contents;
				}
				else
				{
					$this->isShoutcast = False;


     $htmlContent = substr($contents, 0, strpos($contents, "\r\n\r\n"));


     $dataStr = str_replace("\r", "\n", str_replace("\r\n", "\n", $contents));
					$lines = explode("\n", $dataStr);
					foreach ($lines AS $line)
					{
						if ($dp = strpos($line, ":"))
						{
							$key = substr($line, 0, $dp);
							$value = trim(substr($line, ($dp+1)));
							if (preg_match("/genre/i", $key))
								$this->nonShoutcastData['Stream Genre'] = $value;
							if (preg_match("/name/i", $key))
								$this->nonShoutcastData['Stream Title'] = $value;
							if (preg_match("/url/i", $key))
								$this->nonShoutcastData['Stream URL'] = $value;
							if (preg_match("/content-type/i", $key))
								$this->nonShoutcastData['Content Type'] = $value;
							if (preg_match("/icy-br/i", $key))

        $this->nonShoutcastData['Stream Status'] = "Stream is up at ".$value."kbps";
							if (preg_match("/icy-notice2/i", $key))
							{

        $this->nonShoutcastData['Server Status'] = "This is <span style=\"color: 
        red;\">not</span> a Shoutcast server!";
								if (preg_match("/ultravox/i", $value))

         $this->nonShoutcastData['Server Status'] .= " But an <a href=\"http://ultravox.aol.com/\" 
         target=\"_blank\">Ultravox</a> Server";
								$this->altServer = $value;
							}
						}
					}
					return nl2br($htmlContent);
				}
			}
			else
				return $contents;
		}
		else
		{
			return False;
		}
	}
shadwolf:
2-Dec-2009
can i do this oldes ? p: open/direct/no-wait/binary http://ifb.impek.com:8000/
insert p "GET path HTTP/1.0 ^/ Icy-MetaData:1 ^/^/"
Oldes:
2-Dec-2009
opening http scheme is doing the GET for you, so no, you can't do 
that.
Oldes:
2-Dec-2009
you can use something like:

 maxlen: 20 * 4096
 p: open/no-wait/direct tcp://ifb.impek.com:8000
 insert p "GET / HTTP/1.0 ^/Icy-MetaData:1 ^/^/"
 data: copy #{}
 while [not none? buf: copy/part p 2048][
 	append data buf
 	if maxlen <= length? data [break]
 ]
;do something with data 
 close p
Group: Plugin-2 ... Browser Plugins [web-public]
Allen:
16-Jun-2006
read-via-browser might be a better method, seemless do the javascript 
http object without having to expose the javascript required to the 
rebol user, but will it will then pickup the browser security settings 
on such things
JoshM:
4-Jul-2006
The problem is that today REBOL is doing everything itself. It is 
making the socket connection, sending the GET command, etc. In the 
process, it has to know everything about the proxy settings and do 
everything natively.


I am proposing adding new HTTP/FTP support that uses the Win32 API. 
No more socket communication within REBOL -- instead, Win32 does 
everything, including interacting with proxies.
JoshM:
4-Jul-2006
To clarify: I made a mistake above. There is nothing in get-net-info 
that needs fixing. The single question is: do you want a Win32-specific 
refinement that changes the read or write to use the Win32 HTTP/FTP 
API, and consequently enables full proxy support?
Janeks:
28-Sep-2006
I reinstall plugin but it is the same - here some more explanation:

I can not to get to run the new version of script in rebol plugin 
- always getting old version, despite I changed version values in 
both files (web page and script)

Yestrday I solved it so that I saved script with new name - than 
it worked - I could by changing version values run new version of 
script in plugin.
But today with the same file can not.

I have web page for plugin:
>>>>>>snip<<<<<<<<<<<<<
<html>
  <head>

  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-10">
    <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
    <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="PRIVATE">
  </head>
  <body bgcolor="#FFFFFF">

<OBJECT
ID="RPluginIE"
CLASSID="CLSID:9DDFB297-9ED8-421d-B2AC-372A0F36E6C5"

CODEBASE="http://www.rebol.com/plugin/rebolb7.cab#Version=1,0,0,0"
WIDTH="240"
HEIGHT="85"
BORDER="1"
ALT="REBOL/Plugin"></center>
<PARAM NAME="LaunchURL" value="rmapsconsole03.r">
<PARAM NAME="Version" VALUE="1.5.0">
</OBJECT>
  </body>
</html>
>>>>>>>>>>>>>>snap<<<<<<<<<<<<<<<<

and script in the same directory

>>>>>>>>>>>>>>snip<<<<<<<<<<<<<<<
REBOL [
	Title: "Rebol Web Kartes"
	Version: 1.5.0
	Author: "Janeks Kamerovskis"
]

mapsize: 400x300
imgType: "JPEG"

mainWin: layout [
	t1: text "AAA"
	button 200x20 "Atvērt" [
		do smoething
	]
	do [
		t1/text: "Text changed"
		show t1
	]
]

view mainWin
>>>>>>>>>>>>>>snap<<<<<<<<<<<<<<
Group: !Cheyenne ... Discussions about the Cheyenne Web Server [web-public]
Dockimbel:
30-May-2007
Do you mean tunneling Rebservices through HTTP ?
btiffin:
2-Jun-2007
Output is
>> do %raw.r
Script: "Untitled" (none)
HTTP/1.1 301 Moved Permanently
Server: Cheyenne/0.9.11
Content-Length: 1625
Content-Type: text/html
Connection: close
Location: show.rsp

Set-Cookie: RSPSID=IOERCVPFSDASSCXECGDFCTFG; expires=Sat, 02 Jun 
2007 19:54:16 GMT

<html>
<head>
    <title> Manual Sessions</title>
</head>
<body>
<img src="logo.png">
<center>
<h2>Manual session mode</h2>

SESSION is an object of value:
   content         none!     none
   timeout         none!     none
   events          none!     none
   id              none!     none
   active?         logic!    false
   init?           logic!    false
   add             function! [name [word!] value /local pos]
   remove          function! [name [word!]]
   exists?         function! [name [word!]]
   start           function! []
   reset           function! []
   end             function! []

REQUEST is an object of value:
   content         block!    length: 0
   headers         block!    length: 6
   method          word!     GET
   posted          none!     none
   client-ip       tuple!    192.168.1.102
   server-port     integer!  8080
   translated      file!     %www/dev.rsp

   parsed          object!   [headers status-line method url content 
   path targe...
   config          block!    length: 4
   web-app         none!     none
   query-string    function! [/local out]

SESSION is an object of value:
   content         block!    length: 0
   timeout         none!     none
   events          none!     none
   id              none!     none
   active?         logic!    false
   init?           logic!    false
   add             function! [name [word!] value /local pos]
   remove          function! [name [word!]]
   exists?         function! [name [word!]]
   start           function! []
   reset           function! []
   end             function! []


>>
Graham:
5-Jun-2007
How would I send a binary file to a client?  Do I set up the correct 
http content headers, read/binary on the file, and then print it?
Oldes:
19-May-2008
I see... do-cache uniserve-path/protocols/HTTP.r
Dockimbel:
24-Sep-2008
REST: The starting point is to authorize all HTTP methods by adding 
them in mod-static/method-support callback. Then, if Cheyenne doesn't 
choke on them (should be treated by default as a GET, but untested), 
you can write a dispatching RSP page that will basically do a : switch 
request/method [GET [...] POST [...] DELETE [...] ...]. The upcoming 
v0.9.19 release will bring a URL aliasing feature that will allow 
nicer and more RESTful URL.
Graham:
30-Sep-2008
When I do this with the modified http protocol


page: read/custom http://localhost:8080/put.rsp [ PUT %rebview.exe 
]

I get this

<html><title> RSP PUT test </title>
file=%/D/che19/Cheyenne/incoming/zmmnfoto.tmp

</html>
Dockimbel:
12-Feb-2009
1. Good point. You need to use the session/active? to test if a session 
has been automatically created, if not, that means no cookie support 
(require to serve a RSP page first, then check on the next call to 
a RSP page, an HTTP redirection might help you do so). Then, you 
can use session/start to manually start the session and send back 
the SID.
Graham:
18-Aug-2009
I've updated my cheyenne.exe binary to use my prot-http.r so that 
you can do PUT, DELETE, GET with read/custom etc.
Kaj:
9-Nov-2009
Terry, you can do that with async HTTP in JavaScript (AJAX without 
the X(ML))
Kaj:
9-Nov-2009
There's nothing specific you have to do on the web server side except 
providing the service interfaces (regular HTTP responses)
Janko:
24-Nov-2009
set-cookie docs don't exist and it says n/a .. does this mean the 
word is not there any more or something else? Do I have to manually 
set http response headers to set cookies?
Dockimbel:
22-Jan-2010
How about this scenario.. an on-message comes in, the code then does 
a 'read on an external server.. but the server takes 30 secs to respond.. 
does that blocK?


READ is a blocking operation, so it should not be used in Cheyenne 
main process (where ws apps run). Two possible solutions :


1) Use async HTTP with callbacks (I've proposed to include in Cheyenne 
the one I'm using currently for other products).

2) Send the READ job to a worker process using DO-TASK (but it will 
block it for 30secs, so not a very scalable solution).

I would use 1).
Dockimbel:
22-Jan-2010
Would you put a timer in the do-task/on-done func?


Not sure what you want to achieve precisely there. In your "READ 
quotes from remote server and send them every sec" scenario, I wouldn't 
use do-task, but async HTTP (much more efficient and scalable). I 
think I definitely need to add a few async schemes and make an example 
app.
GrahamC:
2-Dec-2010
This is what I am sending

HTTP/1.1 200 OK
Server: Cheyenne/0.9.20
Date: Thu, 02 Dec 2010 15:33:25 GMT
Content-Length: 475
Content-Type: application/vnd.adobe.xfdf
Connection: Keep-Alive
Content-Encoding: deflate
Set-Cookie: RSPSID=XESYTVZSEFSXPQHCTITGRDQG; path=/md; HttpOnly
Cache-Control: private, max-age=0
Expires: -1


Firefox opens up the PDF referenced in the xfdf file that is downloaded.

Chrome just downloads and saves the content.  So maybe it's just 
Chrome's PDF "plugin" that doesn't understand what to do ...
onetom:
3-May-2011
http://www.berenddeboer.net/rest/authentication.html

this is a nice walkthru of the http auth theory with examples on 
how to do cross browser logout, forgotten password page, auto logout, 
etc etc
onetom:
8-May-2011
pff.. my-http is not really transparent...

>> do http://www.rebol.org/download-a-script.r?script-name=my-http.r

connecting to: www.rebol.orgScript: "patched HTTP/HTTPS protocol 
with cookies support" (18-Aug-2006)
== none
>> trace/net on
>> read http://localhost:8080/testapp/login.rsp

URL Parse: none none localhost none testapp/ login.rsp** Script Error: 
querying has no value
** Near: http-command: either querying ["HEAD"] ["GET"]
Dockimbel:
13-May-2011
Could you <Esc> the process and type: netstat? How many HTTP connection 
do you have?
Endo:
9-Dec-2011
You could also use an async HTTP query on an RSP script instead.
 This might do the job.
Group: !REBOL3 Schemes ... Implementors guide [web-public]
Graham:
5-Jan-2010
How do you get the source to the http protocol as documented here 
http://www.rebol.net/docs/prot-http.html
Graham:
5-Jan-2010
read and write are very similar ... can we do this?

		read: func [
			port [port!]
			/write data
		] [
			either any-function? :port/awake [

    unless open? port [cause-error 'Access 'not-open port/spec/ref] 
				if port/state/state <> 'ready [http-error "Port not ready"] 
				port/state/awake: :port/awake 
				do-request port 
				port
			] [
				sync-op port either write [ data ] [[]]
			]
		] 
		write: func [
			port [port!] 
			value
		] [

   unless any [block? :value any-string? :value] [value: form :value] 

   unless block? value [value: reduce [[Content-Type: "application/x-www-form-urlencoded; 
   charset=utf-8"] value]] 
			read/write port data 
		]
Graham:
6-Jan-2010
How do you access make-http-request ?  What's the path to this function?
Henrik:
7-Jan-2010
I guess there needs to be a formal limit to what RT does and what 
community should do. It can't be expected that RT would maintain 
console support on an obscure OS. OTOH you might expect HTTP to work 
as a result of RT work or someone close to RT.
BrianH:
27-Jan-2010
Say you wanted to create an HTTP header, and it had nothing to do 
with HTTP. Are you sure you want to create the same header? Or are 
you sure that you don't actually want to extend the existing http 
scheme? The author isn't psychic.
1 / 115[1] 2